<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>uCXpresso.BLE: CSpiMaster Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../upnp.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">uCXpresso.BLE
   &#160;<span id="projectnumber">v1.0.4</span>
   </div>
   <div id="projectbrief">RTOS C++ Framework for Bluetooth Low Energy</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="../../hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="../../functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d9/d9b/class_c_spi_master.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../d9/d2c/class_c_spi_master-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">CSpiMaster Class Reference<div class="ingroups"><a class="el" href="../../d1/d6c/group___peripherals.html">Peripherals</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &quot;<a class="el" href="../../da/d87/spi_8h_source.html">class/spi.h</a>&quot;</code></p>
<div class="dynheader">
Inheritance diagram for CSpiMaster:</div>
<div class="dyncontent">
 <div class="center">
  <img src="../../d9/d9b/class_c_spi_master.png" usemap="#CSpiMaster_map" alt=""/>
  <map id="CSpiMaster_map" name="CSpiMaster_map">
<area href="../../d2/d3f/class_c_s_p_i.html" alt="CSPI" shape="rect" coords="0,112,80,136"/>
<area href="../../d9/db6/class_c_peripheral.html" alt="CPeripheral" shape="rect" coords="0,56,80,80"/>
<area href="../../dc/dac/class_c_object.html" alt="CObject" shape="rect" coords="0,0,80,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad84a4c9c901f4c1793b9d1dfcfa754b0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d9b/class_c_spi_master.html#ad84a4c9c901f4c1793b9d1dfcfa754b0">CSpiMaster</a> (<a class="el" href="../../db/dff/group___enumerations.html#ga65a2241721e4acb573e0c3fe29ac432f">PIN_NAME_T</a> selPin, bool pullup=true)</td></tr>
<tr class="separator:ad84a4c9c901f4c1793b9d1dfcfa754b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13d1514765c41561d16dd46eefb9926e"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d9b/class_c_spi_master.html#a13d1514765c41561d16dd46eefb9926e">readwrite</a> (void *txbuf, void *rxbuf, uint32_t length)</td></tr>
<tr class="separator:a13d1514765c41561d16dd46eefb9926e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accc9a5c831ee85e95f0bb5567de5f529"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#accc9a5c831ee85e95f0bb5567de5f529">format</a> (<a class="el" href="../../db/dff/group___enumerations.html#gae74cec5e96015c8083810d69358f8f08">SPI_DATABIT_T</a> bits, <a class="el" href="../../db/dff/group___enumerations.html#ga296b79fb83e48fbffa9ee5978d200873">SPI_MODE_T</a> mode=<a class="el" href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873a152359b11fb4b43ed0c5485eb0ab0673">SPI_MODE_0</a>)</td></tr>
<tr class="separator:accc9a5c831ee85e95f0bb5567de5f529"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7a160dad74689b9afb720c78d63558f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#aa7a160dad74689b9afb720c78d63558f">bitOrder</a> (<a class="el" href="../../db/dff/group___enumerations.html#ga0d0ec25638f753b00013a2a99fed1ef4">SPI_BIT_ORDER_T</a> value)</td></tr>
<tr class="separator:aa7a160dad74689b9afb720c78d63558f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8143fa5be48bc62762fda52b86d630a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#ad8143fa5be48bc62762fda52b86d630a">frequency</a> (uint32_t hz)</td></tr>
<tr class="separator:ad8143fa5be48bc62762fda52b86d630a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7dc9ce9f0b38a59f7332e6f4f39864e8"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#a7dc9ce9f0b38a59f7332e6f4f39864e8">enable</a> (<a class="el" href="../../db/dff/group___enumerations.html#ga422c6f9cdd9566ccf18ef0b43bcbc654">SPI_ROLE_T</a> role=<a class="el" href="../../db/dff/group___enumerations.html#gga422c6f9cdd9566ccf18ef0b43bcbc654a84379dc90398ca075038c8d5ee465f6a">SPI_MASTER</a>)</td></tr>
<tr class="separator:a7dc9ce9f0b38a59f7332e6f4f39864e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5009ac7cc08bcf2b1d1be19b320424e6"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#a5009ac7cc08bcf2b1d1be19b320424e6">disable</a> ()</td></tr>
<tr class="separator:a5009ac7cc08bcf2b1d1be19b320424e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab237c0acc917287a8f7cdca7e91e87c6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#ab237c0acc917287a8f7cdca7e91e87c6">isSlave</a> ()</td></tr>
<tr class="separator:ab237c0acc917287a8f7cdca7e91e87c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98fb4712f52c9977d4973430f5f505b8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#a98fb4712f52c9977d4973430f5f505b8">begin</a> (<a class="el" href="../../db/dff/group___enumerations.html#ga422c6f9cdd9566ccf18ef0b43bcbc654">SPI_ROLE_T</a> role=<a class="el" href="../../db/dff/group___enumerations.html#gga422c6f9cdd9566ccf18ef0b43bcbc654a84379dc90398ca075038c8d5ee465f6a">SPI_MASTER</a>)</td></tr>
<tr class="separator:a98fb4712f52c9977d4973430f5f505b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a8f9843e54bf4f11dd871cf798fe337"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#a9a8f9843e54bf4f11dd871cf798fe337">end</a> ()</td></tr>
<tr class="separator:a9a8f9843e54bf4f11dd871cf798fe337"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab702047e1d0378b4c9b893bce96a2863"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#ab702047e1d0378b4c9b893bce96a2863">readwrite</a> (uint8_t tx, uint8_t &amp;rx)</td></tr>
<tr class="separator:ab702047e1d0378b4c9b893bce96a2863"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a173cd30c8b9d9b1a40d6f849a517932b"><td class="memItemLeft" align="right" valign="top">virtual uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#a173cd30c8b9d9b1a40d6f849a517932b">write</a> (uint8_t tx)</td></tr>
<tr class="separator:a173cd30c8b9d9b1a40d6f849a517932b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24ca202a0494b84a92ff56d10725ce40"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#a24ca202a0494b84a92ff56d10725ce40">operator&gt;&gt;</a> (uint8_t &amp;val)</td></tr>
<tr class="separator:a24ca202a0494b84a92ff56d10725ce40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac53ab106be8d0f369b349f82b3db6813"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#ac53ab106be8d0f369b349f82b3db6813">operator&gt;&gt;</a> (uint16_t &amp;val)</td></tr>
<tr class="separator:ac53ab106be8d0f369b349f82b3db6813"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf1a92290aaee5a93f8fc2db9ce4a512"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#aaf1a92290aaee5a93f8fc2db9ce4a512">operator&gt;&gt;</a> (uint32_t &amp;val)</td></tr>
<tr class="separator:aaf1a92290aaee5a93f8fc2db9ce4a512"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ce438bee4e3c087e44b3cf2b1690ecd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#a3ce438bee4e3c087e44b3cf2b1690ecd">operator&lt;&lt;</a> (uint8_t val)</td></tr>
<tr class="separator:a3ce438bee4e3c087e44b3cf2b1690ecd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a272f5e518d21194dbc996f5f5475ae02"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#a272f5e518d21194dbc996f5f5475ae02">operator&lt;&lt;</a> (uint16_t val)</td></tr>
<tr class="separator:a272f5e518d21194dbc996f5f5475ae02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d0cd48d0bba271fd72df43d7528e2a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d3f/class_c_s_p_i.html#a4d0cd48d0bba271fd72df43d7528e2a0">operator&lt;&lt;</a> (uint32_t val)</td></tr>
<tr class="separator:a4d0cd48d0bba271fd72df43d7528e2a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26a76c241a4d62d2efdac57d2cfe4c0f"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/dac/class_c_object.html#a26a76c241a4d62d2efdac57d2cfe4c0f">isThread</a> ()</td></tr>
<tr class="separator:a26a76c241a4d62d2efdac57d2cfe4c0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="../../d9/d9b/class_c_spi_master.html">CSpiMaster</a> class and inherit from <a class="el" href="../../d2/d3f/class_c_s_p_i.html">CSPI</a> class, and provides the master sel pin. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d5/d72/_2peripheral_2spi_2src_2main_8cpp-example.html#_a11">/peripheral/spi/src/main.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ad84a4c9c901f4c1793b9d1dfcfa754b0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CSpiMaster::CSpiMaster </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../db/dff/group___enumerations.html#ga65a2241721e4acb573e0c3fe29ac432f">PIN_NAME_T</a>&#160;</td>
          <td class="paramname"><em>selPin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>pullup</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><a class="el" href="../../d9/d9b/class_c_spi_master.html">CSpiMaster</a> Constructor </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">selPin</td><td>is a PIN_NAME_T to indicate a user's SEL pin for SPI interface. </td></tr>
    <tr><td class="paramname">pullpu</td><td>is a boolean to enable the internal pull-up resistors for SPI interface. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a98fb4712f52c9977d4973430f5f505b8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSPI::begin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../db/dff/group___enumerations.html#ga422c6f9cdd9566ccf18ef0b43bcbc654">SPI_ROLE_T</a>&#160;</td>
          <td class="paramname"><em>role</em> = <code><a class="el" href="../../db/dff/group___enumerations.html#gga422c6f9cdd9566ccf18ef0b43bcbc654a84379dc90398ca075038c8d5ee465f6a">SPI_MASTER</a></code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aa7a160dad74689b9afb720c78d63558f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSPI::bitOrder </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../db/dff/group___enumerations.html#ga0d0ec25638f753b00013a2a99fed1ef4">SPI_BIT_ORDER_T</a>&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the SPI bit order </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>is a SPI_BIT_ORDER_T enumeration to indicate the bit order. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5009ac7cc08bcf2b1d1be19b320424e6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CSPI::disable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Disable the SPI interface </p>

</div>
</div>
<a class="anchor" id="a7dc9ce9f0b38a59f7332e6f4f39864e8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CSPI::enable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../db/dff/group___enumerations.html#ga422c6f9cdd9566ccf18ef0b43bcbc654">SPI_ROLE_T</a>&#160;</td>
          <td class="paramname"><em>role</em> = <code><a class="el" href="../../db/dff/group___enumerations.html#gga422c6f9cdd9566ccf18ef0b43bcbc654a84379dc90398ca075038c8d5ee465f6a">SPI_MASTER</a></code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Enable the SPI interface </p>

</div>
</div>
<a class="anchor" id="a9a8f9843e54bf4f11dd871cf798fe337"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSPI::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="accc9a5c831ee85e95f0bb5567de5f529"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSPI::format </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../db/dff/group___enumerations.html#gae74cec5e96015c8083810d69358f8f08">SPI_DATABIT_T</a>&#160;</td>
          <td class="paramname"><em>bits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../db/dff/group___enumerations.html#ga296b79fb83e48fbffa9ee5978d200873">SPI_MODE_T</a>&#160;</td>
          <td class="paramname"><em>mode</em> = <code><a class="el" href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873a152359b11fb4b43ed0c5485eb0ab0673">SPI_MODE_0</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the SPI format <br/>
 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bits</td><td>is SPI_DATABIT_T enumerations. </td></tr>
    <tr><td class="paramname">mode</td><td>is SPI_MODE_T enumerations. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad8143fa5be48bc62762fda52b86d630a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CSPI::frequency </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>hz</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the SPI CLK frequency </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hz</td><td>is unsigned long value to set the frequency of spi interface. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>: SPI slave don't need to set the frequency of spi. </dd></dl>

</div>
</div>
<a class="anchor" id="ab237c0acc917287a8f7cdca7e91e87c6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CSPI::isSlave </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Check the object is SPI slave or not </p>
<dl class="section return"><dt>Returns</dt><dd>true if the spi object is in slave role, otherwise is master role. </dd></dl>

</div>
</div>
<a class="anchor" id="a26a76c241a4d62d2efdac57d2cfe4c0f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool CObject::isThread </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Check current object that inherits from <a class="el" href="../../d0/d26/class_c_thread.html">CThread</a> class or not. </p>
<dl class="section note"><dt>Note</dt><dd>The isTherad() will be override by <a class="el" href="../../d0/d26/class_c_thread.html">CThread</a> class. </dd></dl>

<p>Reimplemented in <a class="el" href="../../d0/d26/class_c_thread.html#ab2513fd0fcad30e2e6605609c91f1984">CThread</a>.</p>

</div>
</div>
<a class="anchor" id="a3ce438bee4e3c087e44b3cf2b1690ecd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSPI::operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a272f5e518d21194dbc996f5f5475ae02"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSPI::operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a4d0cd48d0bba271fd72df43d7528e2a0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSPI::operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a24ca202a0494b84a92ff56d10725ce40"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSPI::operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype">uint8_t &amp;&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ac53ab106be8d0f369b349f82b3db6813"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSPI::operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype">uint16_t &amp;&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aaf1a92290aaee5a93f8fc2db9ce4a512"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSPI::operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype">uint32_t &amp;&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ab702047e1d0378b4c9b893bce96a2863"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CSPI::readwrite </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>tx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t &amp;&#160;</td>
          <td class="paramname"><em>rx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Transmit and receive a byte (overload functions) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tx</td><td>is a byte which send to spi interface. </td></tr>
    <tr><td class="paramname">rx</td><td>is a byte which receive from spi interface. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if successful, otherwise failed. </dd></dl>

</div>
</div>
<a class="anchor" id="a13d1514765c41561d16dd46eefb9926e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CSpiMaster::readwrite </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>txbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>rxbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Override function, to transmit and receive the SPI data block. <br/>
 The function provides the SEL pin function in the readwrite member function.<br/>
 </p>

<p>Reimplemented from <a class="el" href="../../d2/d3f/class_c_s_p_i.html#a5215a320db4cb5f2792ea18f8d6e0671">CSPI</a>.</p>

</div>
</div>
<a class="anchor" id="a173cd30c8b9d9b1a40d6f849a517932b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint8_t CSPI::write </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>tx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Transmit and receive a byte (overload functions) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tx</td><td>is a byte which send to spi interface. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a byte which receive from spi interface. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d9/d9b/class_c_spi_master.html">CSpiMaster</a></li>
    <li class="footer">Generated on Fri Apr 11 2014 23:43:26 for uCXpresso.BLE by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
